
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class BoardFrame extends JFrame
{

	static ImageIcon boardImage = new ImageIcon("images/board.png");

	JLabel board;
	JLabel firstPlayer;
	JLabel secondPlayer;

	public BoardFrame()
	{
		super("Nine Men's Morris");
		board = new JLabel(boardImage);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setContentPane(board);
		setBounds(180,70,510,530);
		setResizable(false);

		firstPlayer = new JLabel();
		firstPlayer.setBounds(230, 205, 200, 50);
		add(firstPlayer);

		secondPlayer = new JLabel();
		secondPlayer.setBounds(230, 240, 200, 50);
		add(secondPlayer);

	}

	void setStatus(playersInfoEntry x)
	{
		firstPlayer.setText(x.firstPlayerName.getText());
		secondPlayer.setText(x.secondPlayerName.getText());

		firstPlayer.setForeground(x.firstColor);
		secondPlayer.setForeground(x.secondColor);
	}


	void setStatus(singlePlayerInfoEntry x)
	{
		firstPlayer.setText(x.firstPlayerName.getText());
		secondPlayer.setText(x.secondPlayerName.getText());

		firstPlayer.setForeground(x.firstColor);
		secondPlayer.setForeground(x.secondColor);
	}

}
